//Adjust the size of picture in clob  
//2012-10-12 by lj
function ini_clob_pic() {
	var img = document.getElementsByName("showpic");
	//alert(img.length);
	for (var i = 0; i < img.length; i++) {
		var image = new Image();
		var iwidth = 800;      
		var iheight = 533;        
		image.src = img[i].src;
		if (image.width > 0 && image.height > 0) {
			if (image.width / image.height >= iwidth / iheight) {
				if (image.width > iwidth) {
					img[i].width = iwidth;
					img[i].height = (image.height * iwidth) / image.width;
				} else {
					img[i].width = image.width;
					img[i].height = image.height;
				}               
			} else {
				if (image.height > iheight) {
					img[i].height = iheight;
					img[i].width = (image.width * iheight) / image.height;
				} else {
					img[i].width = image.width;
					img[i].height = image.height;
				}                 
			}
		} 
		//alert(img[i].width + ":" + img[i].height)        
	}
}

